package com.xiaoge.springmybatis.service;

import com.xiaoge.springmybatis.mapper.MemberMapper;
import com.xiaoge.springmybatis.mapper.OrderMapper;
import com.xiaoge.springmybatis.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * TODO
 *
 * @author <a href="mailto:1330137071@qq.com">Zhang Xiao</a>
 * @since
 */
@Component
public class UserService {

	@Autowired
	private UserMapper userMapper; // 代理对象赋值给这个属性, spring属性注入, 对象

	@Autowired
	private OrderMapper orderMapper;

	@Autowired
	private MemberMapper memberMapper;


	public void test() {
		System.out.println(userMapper);
		System.out.println(userMapper.getClass().getSimpleName());
		System.out.println(orderMapper);
		System.out.println(orderMapper.getClass().getSimpleName());
		System.out.println(memberMapper);
		System.out.println(memberMapper.getClass().getSimpleName());
		userMapper.selectById(1);
		orderMapper.selectById(1);
		memberMapper.selectById(1);
	}

}
